package com.atguigu.lease.common.exception;

import com.atguigu.lease.common.result.ResultCodeEnum;
import lombok.Data;

/**
 * @BelongsProject: lease
 * @BelongsPackage: com.atguigu.lease.common.exception
 * @Author: 王席舒
 * @CreateTime: 2024-10-06  17:38
 * @Description: TODO
 * @Version: 1.0
 */

@Data
public class LeaseException extends RuntimeException{
    private ResultCodeEnum resultCodeEnum;


    public LeaseException(String message) {
        super(message);
    }


    public LeaseException(ResultCodeEnum resultCodeEnum) {
        super(resultCodeEnum.getMessage());
        this.resultCodeEnum = resultCodeEnum;
    }
}
